package org.itboys.mobile.entity.mysql.wallet;

import org.itboys.mongodb.entity.BaseMySqlEntity;

import java.math.BigDecimal;

/**
 * 作者：zzq
 * 时间：2018/1/27
 * 描述：钱包记录
 */
public class CooWalletRecord extends BaseMySqlEntity{
    private Long memberId;//用户ID
    private Long walletId;//钱包ID
    private Integer type;//记录类型。记录类型。1，充值，2，销售奖励，3管理奖励，  10,提现
    private BigDecimal amount;//记录金额
    private BigDecimal ableAmount;//当前可用金额
    private String remark;//记录类型备注
    private Integer status;//状态。1生效（支付回掉后），0无效（支付前），

    //提现相关属性
    private Long accountId;//提现账号
    private String accountNo;//提现账号
    private String accountName;;//账户姓名
    private String accountBank;//提现银行
    private Integer accountStatus;//提现状态 1，申请中，2，已通过，3，已驳回

    //交易相关
    private String memberName;//用户名称。动态查询
    private String memberMobile;//用户手机号。动态查询


    public CooWalletRecord() {
    }

    public CooWalletRecord(Long memberId, Long walletId, Integer type, String remark, BigDecimal ableAmount,BigDecimal amount, Integer status) {
        this.memberId = memberId;
        this.walletId = walletId;
        this.type = type;
        this.remark = remark;
        this.ableAmount=ableAmount;
        this.amount = amount;
        this.status = status;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getWalletId() {
        return walletId;
    }

    public void setWalletId(Long walletId) {
        this.walletId = walletId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getAccountBank() {
        return accountBank;
    }

    public void setAccountBank(String accountBank) {
        this.accountBank = accountBank;
    }

    public Integer getAccountStatus() {
        return accountStatus;
    }

    public void setAccountStatus(Integer accountStatus) {
        this.accountStatus = accountStatus;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getMemberMobile() {
        return memberMobile;
    }

    public void setMemberMobile(String memberMobile) {
        this.memberMobile = memberMobile;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public BigDecimal getAbleAmount() {
        return ableAmount;
    }

    public void setAbleAmount(BigDecimal ableAmount) {
        this.ableAmount = ableAmount;
    }

    public String  getStatusStr(){
        String statusStr="";
        if(status==null)return statusStr;
        switch (status) {
            case 1:
                statusStr="有效";
                break;
            case 2:
                statusStr="无效";
                break;
            default:
                break;
        }
        return statusStr;
    }

    public String  getTypeStr(){
        String typeStr="";
        if(type==null)return typeStr;
        switch (type) {
            case 1:
                typeStr="充值";
                break;
            case 2:
                typeStr="销售奖励";
                break;
            case 3:
                typeStr="管理奖励";
                break;
            case 4:
                typeStr="全球奖励";
                break;
            default:
                break;
        }
        return typeStr;
    }
}
